package com.yb.java.singleton;

/**
 * @program: design-pattern
 * @description: 饿汉式单例模式,类加载比较慢，但是获取对象速度快
 * @author: Mr.Bo
 * @create: 2021-04-25 20:32
 **/
public class HungryManSingleton {
    private static HungryManSingleton instance = new HungryManSingleton();

    private HungryManSingleton() {
    }

    public static HungryManSingleton getInstance(){
        return instance;
    }
}
